package com.sky.service;

import com.sky.dto.*;
import com.sky.result.PageResult;
import com.sky.vo.*;

import java.time.LocalDateTime;

public interface OrderService {

    // 用户下单
    OrderSubmitVO submitOrder(OrdersSubmitDTO ordersSubmitDTO);

    /**
     * 订单支付
     * @param ordersPaymentDTO
     * @return
     */
    OrderPaymentVO payment(OrdersPaymentDTO ordersPaymentDTO) throws Exception;

    /**
     * 支付成功，修改订单状态
     * @param outTradeNo
     */
    void paySuccess(String outTradeNo);

    //查询历史订单
    PageResult pageQueryHistoryOrders(Integer page, Integer pageSize, Integer status);

    //查询订单详情
    OrderVO orderDetail(Long id);

    //取消订单
    void cancleById(Long id);

    //再来一单
    void repetition(Long id);

    //管理端查询订单
    PageResult pageQuery(OrdersPageQueryDTO ordersPageQueryDTO);

    //各个状态的订单数量统计
    OrderStatisticsVO statistics();

    //接单
    void confirm(OrdersConfirmDTO ordersConfirmDTO);

    //拒单
    void refuse(OrdersRejectionDTO ordersRejectionDTO);

    //取消订单
    void adminCancleById(OrdersCancelDTO ordersCancelDTO);

    //订单配送
    void delivery(Long id);

    //完成订单
    void complete(Long id);

    //催单
    void reminder(Long id);

    //工作台-获取营业数据
    BusinessDataVO getBusinessData(LocalDateTime endTime,  LocalDateTime beginTime);
}


